package com.ouc.yyi.user.springcloud.user.wx.controller;

import com.ouc.yyi.user.springcloud.user.wx.bo.RelPO;
import com.ouc.yyi.user.springcloud.user.wx.bo.WxInfo;
import com.ouc.yyi.user.springcloud.user.wx.service.NewUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: yyi
 * @date: 2022/8/26 12:15
 * @version: 1.0
 **/

@RestController
public class SaveController {

    @Autowired
    private NewUserService newUserService;

    @PostMapping("/rel")
    public void save(RelPO relPO) {
        newUserService.insertBind(relPO);
    }

    @PostMapping("/rela")
    public void save(@RequestBody WxInfo wxInfo) {
        newUserService.insertNewUser(wxInfo);
    }
}
